import React from 'react'
import { useState,useMemo } from 'react';

 const App = () => {
  const [count, setCount] = useState(0);
  const [value, setValue] = useState("")
  const treatCount = useMemo(() => {
    console.log("treatcount");
    return count + 10;
  },[count])
  return (
    <div>
        treatCount: {treatCount} <br/>
        count : {count} <button onClick={() => setCount(count + 1)}>点击</button>
        <br/>
        <input 
            type="text"
            value={value}
            onInput={(e) => {
                setValue(e.target.value)
            }}
            />
    </div>
  )
}
export default App
